package win.smartown.app.base.mvp;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by smartown on 2017/5/4 17:20.
 * Desc:
 */
public class BasePageLoadingPresenter<V extends ILoadingView, Data> extends BasePresenter<V> {

    private List<Data> dataList;
    private int page;

    public BasePageLoadingPresenter(V view) {
        super(view);
        dataList = new ArrayList<>();
    }

    public void refresh() {
        dataList.clear();
        page = 0;
        getNextPage();
    }

    public void getNextPage() {
        page++;
    }

    public List<Data> getDataList() {
        return dataList;
    }
}
